package com.promote.common.properties.initializer;

import javax.servlet.ServletContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.WebApplicationInitializer;

/**
 * web项目启动
 * @author tarena
 *
 */
@Component
public class PlatformInitializer implements WebApplicationInitializer {
	private Logger log = LoggerFactory.getLogger(this.getClass());
    @Override
    public void onStartup(ServletContext servletContext) {
        try {
            log.info("项目正在启动。。。 ");
            PlatformInitFactory.init();
        } catch (Exception e) {
            e.printStackTrace();
            log.info("load properties error:" + e.getMessage());
        }
    }
}
